package com.example.mcdonaldapplication.info

data class GoodsInfo(
    val gid: Int,
    val price: String,
    val content: String,
    val name: String,
    val type: Int,
    val num: Int,
    val tickets: Int,
    val img: String,
    val goodType: Int) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as GoodsInfo

        if (gid != other.gid) return false
        if (price != other.price) return false
        if (content != other.content) return false
        if (name != other.name) return false
        if (type != other.type) return false
        if (num != other.num) return false
        if (tickets != other.tickets) return false
        if (img != other.img) return false
        if (goodType != other.goodType) return false

        return true
    }

    override fun hashCode(): Int {
        var result = gid
        result = 31 * result + price.hashCode()
        result = 31 * result + content.hashCode()
        result = 31 * result + name.hashCode()
        result = 31 * result + type
        result = 31 * result + num
        result = 31 * result + tickets
        result = 31 * result + img.hashCode()
        result = 31 * result + goodType
        return result
    }

    override fun toString(): String {
        return "GoodsInfo(gid=$gid, price='$price', content='$content', name='$name', type=$type, num=$num, tickets=$tickets, img='$img', goodType=$goodType)"
    }


}
